package cc.zy.base.hr.service.impl;

import cc.zy.base.hr.entity.DraftPlanSchedule;
import cc.zy.base.hr.mapper.DraftPlanScheduleMapper;
import cc.zy.base.hr.service.IDraftPlanScheduleService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author YF
 * @time 2022/03/11 10:36:44
 */

@Service
@RequiredArgsConstructor
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public class DraftScheduleServiceImpl extends ServiceImpl<DraftPlanScheduleMapper, DraftPlanSchedule> implements IDraftPlanScheduleService {

    private final DraftPlanScheduleMapper draftSchedule;

    @Override
    @Transactional(rollbackFor = Exception.class)
    public void createDraftSchedule(DraftPlanSchedule draftSchedule) {
        this.save(draftSchedule);
    }
}

